﻿using System.Drawing;
using GeekShop.Properties;

namespace GeekShop
{
    public class Marker
    {
        #region Fields
        private Color color;
        private Bitmap bitmap;
        private Rectangle lable = new Rectangle(2, 2, 7, 7);
        #endregion

        #region Properties
        public Color Color
        {
            get { return this.color; }
            set
            {
                this.color = value;
                Bitmap marker = (Bitmap)Resources.marker.Clone();
                for (int x = 0; x < marker.Width; x++)
                {
                    for (int y = 0; y < marker.Height; y++)
                    {
                        Color c = marker.GetPixel(x, y);
                        if (c.ToArgb() == Color.Fuchsia.ToArgb())
                        {
                            marker.SetPixel(x, y, value);
                        }
                    }
                }
                this.bitmap = marker;
            }
        }
        public Bitmap Bitmap
        {
            get { return this.bitmap; }
        }
        #endregion

        #region Constructor
        public Marker(Color color)
        {
            this.Color = color;
        }
        #endregion
    }
}
